<?php
if (!defined('ABSPATH')) {
	define('ABSPATH', dirname(dirname(__FILE__)) . '/');
}

require_once ABSPATH . 'dr-config.php';
require_once ABSPATH . DRINC . '/dr-base.php';
require_once ABSPATH . DRINC . '/dr-functions.php';


$user_id = dr_post('user_id');
$clear_type = dr_post('clear_type');

if (!empty($user_id) && !empty($clear_type)) {
	echo dr_clear_record($user_id, $clear_type);
} else {
	echo 0;
}
